Skip to content

Fix type comparison in reproducible script#14571

Closed
BarbossHack wants to merge 1 commit intosignalapp:mainfrom
BarbossHack:reproducible-strict-type-comparison
Closed

Fix type comparison in reproducible script#14571
BarbossHack wants to merge 1 commit intosignalapp:mainfrom
BarbossHack:reproducible-strict-type-comparison

Conversation

@BarbossHack
Copy link
Contributor

@BarbossHack BarbossHack commented Jan 31, 2026

First time contributor checklist

Contributor checklist

  • Desktop, Linux (feodra 42)
  • My contribution is fully baked and ready to be merged as is
  • I ensure that all the open issues my contribution fixes are mentioned in the commit message of my first commit using the Fixes #1234 syntax

Description

Enforce strict type comparison.

Example of a bad type comparison with '==':

class Meta(type):
    def __eq__(cls, other):
        return True
class A(metaclass=Meta):
    pass
class B(metaclass=Meta):
    pass

a = A()
b = B()
print(type(a) == type(b))  # True  - because Meta.__eq__ returns True
print(type(a) is type(b))  # False - type check is correct

@BarbossHack BarbossHack force-pushed the reproducible-strict-type-comparison branch from 58f924f to fbd0a79 Compare February 2, 2026 19:05
alabiaga pushed a commit to alabiaga/Signal-Android that referenced this pull request Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants